﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace STKMIS.Model
{
    /// <summary>
    /// 的实体类
    /// </summary>
    [Serializable]
   public  class PurchaseModel
    {
        // 常量
        public const string tableName = "Purchase";
        public const string primaryKeyName = "PurchaseID";

        // 成员变量
        private int _purchaseID;
        private string _purchaseBillNo;
        private int _productSupplierID;
        private DateTime _purchaseTime;
        private decimal _purchaseSumMoney;
        private string _purchaseRemark;
        private int _purchaseUserID;
        private string _billState;
        private Boolean _isDeleted;

        /// <summary>
        /// 字段名结构
        /// <summary>
        public struct FieldName
        {
            public const string purchaseID = "PurchaseID";
            public const string purchaseBillNo = "PurchaseBillNo";
            public const string productSupplierID = "ProductSupplierID";
            public const string purchaseTime = "PurchaseTime";
            public const string purchaseSumMoney = "PurchaseSumMoney";
            public const string purchaseRemark = "PurchaseRemark";
            public const string purchaseUserID = "PurchaseUserID";
            public const string billState = "BillState";
            public const string isDeleted = "IsDeleted";
        }

        /// <summary>
        /// 默认构造函数
        /// <summary>
        public PurchaseModel() { }

        /// <summary>
        /// 带参构造函数
        /// <summary>
        ///<param name="purchaseID">采购主键ID</param>
        ///<param name="purchaseBillNo">采购单号</param>
        ///<param name="productSupplierID">供应商</param>
        ///<param name="purchaseTime">采购时间</param>
        ///<param name="purchaseSumMoney">采购总金额</param>
        ///<param name="purchaseRemark">采购备注</param>
        ///<param name="purchaseUserID">采购人</param>
        ///<param name="billState">状态</param>
        ///<param name="isDeleted">是否已经删除</param>
        public PurchaseModel(int purchaseID, string purchaseBillNo, int productSupplierID, DateTime purchaseTime, decimal purchaseSumMoney, string purchaseRemark, int purchaseUserID, string billState, Boolean isDeleted)
        {
            this._purchaseID = purchaseID;
            this._purchaseBillNo = purchaseBillNo;
            this._productSupplierID = productSupplierID;
            this._purchaseTime = purchaseTime;
            this._purchaseSumMoney = purchaseSumMoney;
            this._purchaseRemark = purchaseRemark;
            this._purchaseUserID = purchaseUserID;
            this._billState = billState;
            this._isDeleted = isDeleted;
        }

        /// <summary>
        /// 采购主键ID
        /// <summary>
        public int PurchaseID
        { 
            get { return _purchaseID; }
            set { _purchaseID = value; }
        }

        /// <summary>
        /// 采购单号
        /// <summary>
        public string PurchaseBillNo
        { 
            get { return _purchaseBillNo; }
            set { _purchaseBillNo = value; }
        }

        /// <summary>
        /// 供应商
        /// <summary>
        public int ProductSupplierID
        { 
            get { return _productSupplierID; }
            set { _productSupplierID = value; }
        }

        /// <summary>
        /// 采购时间
        /// <summary>
        public DateTime PurchaseTime
        { 
            get { return _purchaseTime; }
            set { _purchaseTime = value; }
        }

        /// <summary>
        /// 采购总金额
        /// <summary>
        public decimal PurchaseSumMoney
        { 
            get { return _purchaseSumMoney; }
            set { _purchaseSumMoney = value; }
        }

        /// <summary>
        /// 采购备注
        /// <summary>
        public string PurchaseRemark
        { 
            get { return _purchaseRemark; }
            set { _purchaseRemark = value; }
        }

        /// <summary>
        /// 采购人
        /// <summary>
        public int PurchaseUserID
        { 
            get { return _purchaseUserID; }
            set { _purchaseUserID = value; }
        }

        /// <summary>
        /// 状态
        /// <summary>
        public string BillState
        { 
            get { return _billState; }
            set { _billState = value; }
        }

        /// <summary>
        /// 是否已经删除
        /// <summary>
        public Boolean IsDeleted
        { 
            get { return _isDeleted; }
            set { _isDeleted = value; }
        }
        /// <summary>
        /// 采购明细
        /// </summary>
        public List<PurchaseItemModel> PurchaseItemList { get; set; }
    }
}
